#include<iostream>
using namespace std;

double harmonic_mean(double,double);

int main()
{
    double a,b;
    cout << "Enter two numbers:";
    while( (cin >> a >> b) && a != 0 && b != 0)
    {
        cout << harmonic_mean(a,b) << endl;
        cout << "Enter two numbers again:";
    }
    cout << "Done!" << endl;

    return 0;
}

double harmonic_mean(double a,double b)
{
    return 2 / ( 1/a + 1/b);
}

